package com.example.demo.dao;

import com.example.demo.entity.FavoriteEntity;
import com.example.demo.vo.FavoriteVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FavoriteDao {
    List<FavoriteEntity> getFavoritesByUserId(@Param("user_id") int user_id);
    int addFavorite(@Param("favoriteVo") FavoriteVo favoriteVo);
    int delFavorite(@Param("id") int id);
    int delFavoriteByUserAndProduct(@Param("user_id") int user_id, @Param("products_id") int products_id);
    Integer isFavoriteExists(@Param("user_id") int user_id, @Param("products_id") int products_id);
    int delFavoriteUserId(@Param("user_id") int user_id);
}